﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChonVaiTro.aspx.cs" Inherits="_12CSolution.Cpanel.ChonVaiTro" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .red {
            color: Red !important;
        }

        .khung {
            margin-top: 10px;
            margin-left: 46px;
        }

        #unlicensed {
            z-index: -1;
            display: none !important;
        }

        #logo {
            height: 100px;
            margin-left: 100px;
            background: url(images/Logo.png) no-repeat top left;
            background-size: 130px;
            background-repeat: no-repeat;
        }

        #LoiChao {
            margin-left: 105px;
            margin-bottom: 10px;
        }

        #btnSubmit {
            height: 16px;
            width: 30px;
        }
    </style>
    <script type="text/javascript" language="javascript">
        var enterKeyPressHandler = function (f, e) {
            if (e.getKey() == e.ENTER) {
                Ext.net.DirectMethods.Accept();
                e.stopEvent();
            }
        }
        var EnterInput = function (f, e) {
            if (e.getKey() == e.ENTER) {
                e.preventDefault(); btnSubmit.fireEvent('click');
                e.stopEvent();
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <%--<ext:ResourceManager runat="server" ID="rs">
        </ext:ResourceManager>--%>
        <%--Store danh sách đơn vị theo người dùng đăng nhập--%>
        <%--<ext:Store ID="StoreDonVi" runat="server">
            <Reader>
                <ext:JsonReader>
                    <Fields>
                        <ext:RecordField Name="pk_iDonViID" />
                        <ext:RecordField Name="sTenDonVi" />
                        <ext:RecordField Name="sGhiChu" />
                    </Fields>
                </ext:JsonReader>
            </Reader>
        </ext:Store>--%>
        <%--Store danh sách vai trò theo người dùng đăng nhập--%>
        <%--<ext:Store ID="StoreVaiTro" runat="server">
            <Reader>
                <ext:JsonReader>
                    <Fields>
                        <ext:RecordField Name="pk_iVaiTroID" />
                        <ext:RecordField Name="sTenVaiTro" />
                        <ext:RecordField Name="sGhiChu" />
                    </Fields>
                </ext:JsonReader>
            </Reader>
        </ext:Store>

        <div class="khung">
            <div id="logo"></div>
            <div id="LoiChao">
                <label>Xin chào, </label>
                <asp:Label runat="server" ID="TenUser" ForeColor="Red" Font-Bold="True" />
                <br />
                <label>Xin chọn Đơn vị và Vai trò quản lý:</label>
                <br />

            </div>
            <ext:FormPanel runat="server" ButtonAlign="Center" ID="frmMain" Border="false" Hidden="true">
                <Items>
                    <ext:ComboBox ID="cboDonVi" AllowBlank="false" runat="server"
                        DisplayField="sTenDonVi" ValueField="pk_iDonViID" EmptyText="Chọn đơn vị..."
                        StoreID="StoreDonVi" Width="250" OnDirectSelect="cboDonVi_Change" ClientIDMode="Static" Editable="false">
                        <Listeners>
                            <SpecialKey Fn="enterKeyPressHandler" />
                        </Listeners>
                    </ext:ComboBox>
                    <ext:SelectBox AllowBlank="true"
                        runat="server" ID="cboVaiTro" DisplayField="sTenVaiTro" ValueField="pk_iVaiTroID"
                        TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" Width="250"
                        EmptyText="Chọn vai trò..." SelectOnFocus="true" SelectionMode="All" StoreID="StoreVaiTro" ClientIDMode="Static">
                        <Listeners>
                            <SpecialKey Fn="enterKeyPressHandler" />
                        </Listeners>
                    </ext:SelectBox>
                </Items>
                <Buttons>
                    <ext:Button runat="server" ID="btnSubmit" Text="Đồng ý" Width="60" ClientIDMode="Static" OnDirectClick="btnSubmit_Click">
                    </ext:Button>
                </Buttons>

            </ext:FormPanel>--%>
        </div>

    </form>
</body>
</html>
